package com.sca.point.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * RefreshScope: 通知spring，该类中的属性对nacos配置进行监听
 *
 * @author liuxianfei
 * @since 2020/11/6 10:51
 */
@Setter
@Getter
@RefreshScope
@Configuration
public class CommonConfig {

    /**
     * token签名密钥
     */
    @Value("${sca.jwt.secret}")
    private String secret;

    /**
     * 慢请求记录阈值，单位：毫秒
     */
    @Value("${sca.log.slow-req-threshold}")
    private Integer slowReqThreshold;

}
